package com.jsgt.greekfire.ui.coin

import android.content.Context
import android.widget.TextView
import com.fhx.core.base.BaseActivity
import com.fhx.core.utils.ToastUtils
import com.jsgt.greekfire.App.Companion.context
import com.jsgt.greekfire.R
import kotlinx.android.synthetic.main.activity_transaction_info.*

class TransactionInfoActivity : BaseActivity() {
    var tvTitle: TextView? = null
    override fun getLayoutId(): Int = R.layout.activity_transaction_info
    override fun main() {
        tvTitle = findViewById(R.id.title_tv)
        tvTitle?.text = resources.getString(R.string.transaction_info_title) + ("ETH")
        tvTotalTransactions?.text = "￥123"
        tvNumberTransactions?.text = "754 ETH"
        tvTransactionUnit?.text = "￥46.564"
        tvOrderTime?.text = "2020-07-12 22:07:37"
        tvOrderNumber?.text = "200712220736242"
        ivCopyOrderNumber.setOnClickListener { v ->
            val clipboardManager = context.getSystemService(Context.CLIPBOARD_SERVICE)
                    as android.text.ClipboardManager
            clipboardManager.text = tvOrderNumber?.text.toString().trim()
            ToastUtils.show(resources.getString(R.string.copied))
        }

        tvMethodPayment?.text = "支付宝(54646546464)"
        tvNameCollection?.text = "杨鑫"
        tvPaymentTime?.text = "2020-07-12 22:07:37"
        tvSellersnickname?.text = "风之落叶"


    }

}